//
//  DownViewController.m
//  CarFace
//
//  Created by dlios on 15-3-23.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "DownViewController.h"
#import "UIButton+InitButton.h"

@interface DownViewController ()<UITableViewDataSource, UITableViewDelegate>
@property(nonatomic, retain)UITableView *tableView;
@end

@implementation DownViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
   
    CGFloat width = self.view.bounds.size.width;
    CGFloat height = self.view.bounds.size.height;
    
    UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(width - 280, 0, width - 90, height)];
    scrollView.scrollEnabled = YES;
    scrollView.backgroundColor = [UIColor purpleColor];
    scrollView.contentSize = CGSizeMake(width - 90, 0);
    [self.view addSubview:scrollView];
    [scrollView release];
   
    
    CGFloat widthS = scrollView.frame.size.width;
    CGFloat heightS = scrollView.frame.size.height;
    
    UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(widthS - 180, heightS - 640, 80, 30)];
    lable.text = @"栏目分类";
    lable.textAlignment = NSTextAlignmentCenter;
    [scrollView addSubview:lable];
    [lable release];
    
    UIButton *closeButton = [UIButton buttonWithTitle:@"关闭" frame:CGRectMake(widthS - 50, heightS - 640 , 40, 30) target:self action:@selector(clickCloseButton:)];
    [scrollView addSubview:closeButton];
    

    self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(widthS - 280, heightS - 610, widthS, heightS - 50) style:UITableViewStylePlain];
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    [scrollView addSubview:self.tableView];
    [_tableView release];
    
    
    
    
    
   
    
}

- (void)clickCloseButton:(UIButton *)button
{
  [self dismissViewControllerAnimated:YES completion:^{
  }];
}


#pragma mark - tableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 100;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
 static NSString *str = @"reuse";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:str];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:str]autorelease];
    }
    
    return cell;

}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
  


}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
